import { defineStore } from 'pinia'

export const useTopinfoStore = defineStore('topinfo', {
  state: () => {
    return {
      show: false,
      name:''
    }
  },
  // 也可以这样定义
  // state: () => ({ count: 0 })
  actions: {
    showTopinfo(name) {
        this.name = name;
        this.show = true;
    }
  }
})